html {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-image: radial-gradient( #5d5d5d, #000 80%);
    perspective: 550px; 
}

.box1{
    transform:rotateY(50deg);
    transform-style: preserve-3d;
    width: 400px;
    height: 250px;
    border: 5px solid #1cc5dc;
    background-color: #ffe3fe;
}
.box1 span {
    color: #ff79cd;
    display: flex;
    width: 400px;
    height: 150px;
    transform: translateZ(40px);
    border: 2px solid #b218e0;
}
.box1 span:hover{
    border-color: transparent;
    transform: translateZ(0px);
    transition-duration: 1s;
}